﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AopOfAutofacCastleDemo
{   
    public interface IPersonRepository
    {
        IEnumerable<Person> GetAll();
        Person Get(int id);
        Person Add(Person item);
        bool Update(Person item);
        bool Delete(int id);
    }

    public class PersonRepository : IPersonRepository
    {
        public Person Add(Person item)
        {
            Console.WriteLine("Add()");
            return item;
        }

        public bool Delete(int id)
        {
            Console.WriteLine("Delete()");
            return true;
        }

        public Person Get(int id)
        {
            throw new NotImplementedException();
        }

        public IEnumerable<Person> GetAll()
        {
            throw new NotImplementedException();
        }

        public bool Update(Person item)
        {
            throw new NotImplementedException();
        }
    }
}

